3.2.70 \(\int \csc (e+f x) (a+b \sin (e+f x))^3 \, dx\) [170]

3.2.70.1 Optimal result
3.2.70.2 Mathematica [A] (verified)
3.2.70.3 Rubi [A] (verified)
3.2.70.4 Maple [A] (verified)
3.2.70.5 Fricas [A] (verification not implemented)
3.2.70.6 Sympy [F]
3.2.70.7 Maxima [A] (verification not implemented)
3.2.70.8 Giac [A] (verification not implemented)
3.2.70.9 Mupad [B] (verification not implemented)

3.2.70.1 Optimal result

Integrand size = 19, antiderivative size = 74 \[ \int \csc (e+f x) (a+b \sin (e+f x))^3 \, dx=\frac {1}{2} b \left (6 a^2+b^2\right ) x-\frac {a^3 \text {arctanh}(\cos (e+f x))}{f}-\frac {5 a b^2 \cos (e+f x)}{2 f}-\frac {b^2 \cos (e+f x) (a+b \sin (e+f x))}{2 f} \]

output
1/2*b*(6*a^2+b^2)*x-a^3*arctanh(cos(f*x+e))/f-5/2*a*b^2*cos(f*x+e)/f-1/2*b 
^2*cos(f*x+e)*(a+b*sin(f*x+e))/f
 
3.2.70.2 Mathematica [A] (verified)

Time = 1.15 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.09 \[ \int \csc (e+f x) (a+b \sin (e+f x))^3 \, dx=-\frac {-2 b \left (6 a^2+b^2\right ) (e+f x)+12 a b^2 \cos (e+f x)+4 a^3 \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )-4 a^3 \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )+b^3 \sin (2 (e+f x))}{4 f} \]

input
Integrate[Csc[e + f*x]*(a + b*Sin[e + f*x])^3,x]
 
output
-1/4*(-2*b*(6*a^2 + b^2)*(e + f*x) + 12*a*b^2*Cos[e + f*x] + 4*a^3*Log[Cos 
[(e + f*x)/2]] - 4*a^3*Log[Sin[(e + f*x)/2]] + b^3*Sin[2*(e + f*x)])/f
 
3.2.70.3 Rubi [A] (verified)

Time = 0.49 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.421, Rules used = {3042, 3272, 3042, 3502, 3042, 3214, 3042, 4257}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \csc (e+f x) (a+b \sin (e+f x))^3 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {(a+b \sin (e+f x))^3}{\sin (e+f x)}dx\)

\(\Big \downarrow \) 3272

\(\displaystyle \frac {1}{2} \int \csc (e+f x) \left (2 a^3+5 b^2 \sin ^2(e+f x) a+b \left (6 a^2+b^2\right ) \sin (e+f x)\right )dx-\frac {b^2 \cos (e+f x) (a+b \sin (e+f x))}{2 f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{2} \int \frac {2 a^3+5 b^2 \sin (e+f x)^2 a+b \left (6 a^2+b^2\right ) \sin (e+f x)}{\sin (e+f x)}dx-\frac {b^2 \cos (e+f x) (a+b \sin (e+f x))}{2 f}\)

\(\Big \downarrow \) 3502

\(\displaystyle \frac {1}{2} \left (\int \csc (e+f x) \left (2 a^3+b \left (6 a^2+b^2\right ) \sin (e+f x)\right )dx-\frac {5 a b^2 \cos (e+f x)}{f}\right )-\frac {b^2 \cos (e+f x) (a+b \sin (e+f x))}{2 f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{2} \left (\int \frac {2 a^3+b \left (6 a^2+b^2\right ) \sin (e+f x)}{\sin (e+f x)}dx-\frac {5 a b^2 \cos (e+f x)}{f}\right )-\frac {b^2 \cos (e+f x) (a+b \sin (e+f x))}{2 f}\)

\(\Big \downarrow \) 3214

\(\displaystyle \frac {1}{2} \left (2 a^3 \int \csc (e+f x)dx+b x \left (6 a^2+b^2\right )-\frac {5 a b^2 \cos (e+f x)}{f}\right )-\frac {b^2 \cos (e+f x) (a+b \sin (e+f x))}{2 f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{2} \left (2 a^3 \int \csc (e+f x)dx+b x \left (6 a^2+b^2\right )-\frac {5 a b^2 \cos (e+f x)}{f}\right )-\frac {b^2 \cos (e+f x) (a+b \sin (e+f x))}{2 f}\)

\(\Big \downarrow \) 4257

\(\displaystyle \frac {1}{2} \left (-\frac {2 a^3 \text {arctanh}(\cos (e+f x))}{f}+b x \left (6 a^2+b^2\right )-\frac {5 a b^2 \cos (e+f x)}{f}\right )-\frac {b^2 \cos (e+f x) (a+b \sin (e+f x))}{2 f}\)

input
Int[Csc[e + f*x]*(a + b*Sin[e + f*x])^3,x]
 
output
(b*(6*a^2 + b^2)*x - (2*a^3*ArcTanh[Cos[e + f*x]])/f - (5*a*b^2*Cos[e + f* 
x])/f)/2 - (b^2*Cos[e + f*x]*(a + b*Sin[e + f*x]))/(2*f)
 

3.2.70.3.1 Defintions of rubi rules used

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3214
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_. 
)*(x_)]), x_Symbol] :> Simp[b*(x/d), x] - Simp[(b*c - a*d)/d   Int[1/(c + d 
*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
 

rule 3272
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + 
 (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b^2)*Cos[e + f*x]*(a + b*Sin[e + f* 
x])^(m - 2)*((c + d*Sin[e + f*x])^(n + 1)/(d*f*(m + n))), x] + Simp[1/(d*(m 
 + n))   Int[(a + b*Sin[e + f*x])^(m - 3)*(c + d*Sin[e + f*x])^n*Simp[a^3*d 
*(m + n) + b^2*(b*c*(m - 2) + a*d*(n + 1)) - b*(a*b*c - b^2*d*(m + n - 1) - 
 3*a^2*d*(m + n))*Sin[e + f*x] - b^2*(b*c*(m - 1) - a*d*(3*m + 2*n - 2))*Si 
n[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a* 
d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[m, 2] && (IntegerQ[m 
] || IntegersQ[2*m, 2*n]) &&  !(IGtQ[n, 2] && ( !IntegerQ[m] || (EqQ[a, 0] 
&& NeQ[c, 0])))
 

rule 3502
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) 
+ (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Co 
s[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m 
+ 2))   Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m 
 + 2) - a*C)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] 
 &&  !LtQ[m, -1]
 

rule 4257
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] 
 /; FreeQ[{c, d}, x]
 
3.2.70.4 Maple [A] (verified)

Time = 0.69 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.93

method result size
parallelrisch \(\frac {12 a^{2} b f x +2 b^{3} f x +4 a^{3} \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )-12 \cos \left (f x +e \right ) a \,b^{2}-\sin \left (2 f x +2 e \right ) b^{3}-12 a \,b^{2}}{4 f}\) \(69\)
derivativedivides \(\frac {a^{3} \ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )\right )+3 a^{2} b \left (f x +e \right )-3 \cos \left (f x +e \right ) a \,b^{2}+b^{3} \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f}\) \(75\)
default \(\frac {a^{3} \ln \left (-\cot \left (f x +e \right )+\csc \left (f x +e \right )\right )+3 a^{2} b \left (f x +e \right )-3 \cos \left (f x +e \right ) a \,b^{2}+b^{3} \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f}\) \(75\)
risch \(3 a^{2} b x +\frac {b^{3} x}{2}-\frac {3 a \,b^{2} {\mathrm e}^{i \left (f x +e \right )}}{2 f}-\frac {3 a \,b^{2} {\mathrm e}^{-i \left (f x +e \right )}}{2 f}+\frac {a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )}{f}-\frac {a^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )}{f}-\frac {b^{3} \sin \left (2 f x +2 e \right )}{4 f}\) \(107\)
norman \(\frac {\left (3 a^{2} b +\frac {1}{2} b^{3}\right ) x +\frac {b^{3} \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\left (3 a^{2} b +\frac {1}{2} b^{3}\right ) x \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (9 a^{2} b +\frac {3}{2} b^{3}\right ) x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (9 a^{2} b +\frac {3}{2} b^{3}\right ) x \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )-\frac {6 a \,b^{2}}{f}-\frac {b^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{f}-\frac {6 a \,b^{2} \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}-\frac {12 a \,b^{2} \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{3}}+\frac {a^{3} \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}\) \(209\)

input
int(csc(f*x+e)*(a+b*sin(f*x+e))^3,x,method=_RETURNVERBOSE)
 
output
1/4*(12*a^2*b*f*x+2*b^3*f*x+4*a^3*ln(tan(1/2*f*x+1/2*e))-12*cos(f*x+e)*a*b 
^2-sin(2*f*x+2*e)*b^3-12*a*b^2)/f
 
3.2.70.5 Fricas [A] (verification not implemented)

Time = 0.35 (sec) , antiderivative size = 79, normalized size of antiderivative = 1.07 \[ \int \csc (e+f x) (a+b \sin (e+f x))^3 \, dx=-\frac {b^{3} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + 6 \, a b^{2} \cos \left (f x + e\right ) + a^{3} \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) - a^{3} \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) - {\left (6 \, a^{2} b + b^{3}\right )} f x}{2 \, f} \]

input
integrate(csc(f*x+e)*(a+b*sin(f*x+e))^3,x, algorithm="fricas")
 
output
-1/2*(b^3*cos(f*x + e)*sin(f*x + e) + 6*a*b^2*cos(f*x + e) + a^3*log(1/2*c 
os(f*x + e) + 1/2) - a^3*log(-1/2*cos(f*x + e) + 1/2) - (6*a^2*b + b^3)*f* 
x)/f
 
3.2.70.6 Sympy [F]

\[ \int \csc (e+f x) (a+b \sin (e+f x))^3 \, dx=\int \left (a + b \sin {\left (e + f x \right )}\right )^{3} \csc {\left (e + f x \right )}\, dx \]

input
integrate(csc(f*x+e)*(a+b*sin(f*x+e))**3,x)
 
output
Integral((a + b*sin(e + f*x))**3*csc(e + f*x), x)
 
3.2.70.7 Maxima [A] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 71, normalized size of antiderivative = 0.96 \[ \int \csc (e+f x) (a+b \sin (e+f x))^3 \, dx=\frac {12 \, {\left (f x + e\right )} a^{2} b + {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} b^{3} - 12 \, a b^{2} \cos \left (f x + e\right ) - 4 \, a^{3} \log \left (\cot \left (f x + e\right ) + \csc \left (f x + e\right )\right )}{4 \, f} \]

input
integrate(csc(f*x+e)*(a+b*sin(f*x+e))^3,x, algorithm="maxima")
 
output
1/4*(12*(f*x + e)*a^2*b + (2*f*x + 2*e - sin(2*f*x + 2*e))*b^3 - 12*a*b^2* 
cos(f*x + e) - 4*a^3*log(cot(f*x + e) + csc(f*x + e)))/f
 
3.2.70.8 Giac [A] (verification not implemented)

Time = 0.32 (sec) , antiderivative size = 108, normalized size of antiderivative = 1.46 \[ \int \csc (e+f x) (a+b \sin (e+f x))^3 \, dx=\frac {2 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) \right |}\right ) + {\left (6 \, a^{2} b + b^{3}\right )} {\left (f x + e\right )} + \frac {2 \, {\left (b^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 6 \, a b^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - b^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 6 \, a b^{2}\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 1\right )}^{2}}}{2 \, f} \]

input
integrate(csc(f*x+e)*(a+b*sin(f*x+e))^3,x, algorithm="giac")
 
output
1/2*(2*a^3*log(abs(tan(1/2*f*x + 1/2*e))) + (6*a^2*b + b^3)*(f*x + e) + 2* 
(b^3*tan(1/2*f*x + 1/2*e)^3 - 6*a*b^2*tan(1/2*f*x + 1/2*e)^2 - b^3*tan(1/2 
*f*x + 1/2*e) - 6*a*b^2)/(tan(1/2*f*x + 1/2*e)^2 + 1)^2)/f
 
3.2.70.9 Mupad [B] (verification not implemented)

Time = 6.47 (sec) , antiderivative size = 259, normalized size of antiderivative = 3.50 \[ \int \csc (e+f x) (a+b \sin (e+f x))^3 \, dx=\frac {a^3\,\ln \left (\frac {\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}\right )}{f}-\frac {b^3\,\mathrm {atan}\left (\frac {2\,\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )\,a^3+6\,\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )\,a^2\,b+\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )\,b^3}{-2\,\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )\,a^3+6\,\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )\,a^2\,b+\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )\,b^3}\right )}{f}-\frac {b^3\,\sin \left (2\,e+2\,f\,x\right )}{4\,f}-\frac {6\,a^2\,b\,\mathrm {atan}\left (\frac {2\,\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )\,a^3+6\,\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )\,a^2\,b+\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )\,b^3}{-2\,\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )\,a^3+6\,\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )\,a^2\,b+\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )\,b^3}\right )}{f}-\frac {3\,a\,b^2\,\cos \left (e+f\,x\right )}{f} \]

input
int((a + b*sin(e + f*x))^3/sin(e + f*x),x)
 
output
(a^3*log(sin(e/2 + (f*x)/2)/cos(e/2 + (f*x)/2)))/f - (b^3*atan((b^3*cos(e/ 
2 + (f*x)/2) + 2*a^3*sin(e/2 + (f*x)/2) + 6*a^2*b*cos(e/2 + (f*x)/2))/(b^3 
*sin(e/2 + (f*x)/2) - 2*a^3*cos(e/2 + (f*x)/2) + 6*a^2*b*sin(e/2 + (f*x)/2 
))))/f - (b^3*sin(2*e + 2*f*x))/(4*f) - (6*a^2*b*atan((b^3*cos(e/2 + (f*x) 
/2) + 2*a^3*sin(e/2 + (f*x)/2) + 6*a^2*b*cos(e/2 + (f*x)/2))/(b^3*sin(e/2 
+ (f*x)/2) - 2*a^3*cos(e/2 + (f*x)/2) + 6*a^2*b*sin(e/2 + (f*x)/2))))/f - 
(3*a*b^2*cos(e + f*x))/f